package com.xyh;

import org.springframework.cloud.netflix.zuul.filters.discovery.PatternServiceRouteMapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

//@Configuration
public class MyConfig {
    /**
     * 访问网关/xxx/** 将会路由到zuul-xxxx-service 服务进行处理
     */
    @Bean
    public PatternServiceRouteMapper patternServiceRouteMapper(){
        return new PatternServiceRouteMapper("(spring)-(zuul)-(?<module>.+)","${module}/**");
    }
}
